package com.steven.cron;

import com.steven.domain.User;
import com.steven.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 12-7-13
 * Time: 上午12:53
 * To change this template use File | Settings | File Templates.
 */
@Repository
public class CronJob {

    @Autowired
    @Qualifier("userService")
    private UserService userService;

    public void delte(){
        List user_list = userService.queryAll(" from User");

        User user = (User) user_list.get(0);

        System.out.println("---------"+"CronJob: "+user.getUsername()+"---------");
    }
}
